www.gusucode.com > 婚庆仪礼策划公司网站系统源代码 梦紫色 > 婚庆仪礼策划公司网站系统源代码 梦紫色/admin_news_add_save.asp
<%@ Language=VBScript codepage=936%> <!--#include file = admin_chk.asp --> <% 'session.codepage=936 Randomize dtt= int((999-100+1) * RND +100) %> <!--#include file = admin_conn.asp --> <!--#include file = titleb.asp --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta http-equiv="Content-Language" content="zh-cn"> <!--#include file = language.asp --> <STYLE type="text/css"> <!-- a:link {text-decoration: none; font-family: AdobeSm; color: #000000 } a:visited {text-decoration: none; color: #000000 } A:hover {COLOR: green; FONT-FAMILY: Verdana, 宋体, MingLiU; TEXT-DECORATION: underline } body {font-size: 10.5pt; font-family: Verdana,宋体,MingLiU, Arial;color: #000000} TD {FONT-SIZE: 10.5pt; FONT-FAMILY: Verdana, 宋体, MingLiU, Arial; color: #000000;line-height: 120%;table-layout:fixed;word-break:break-all } p {FONT-SIZE: 10.5pt; FONT-FAMILY: Verdana, 宋体, MingLiU, Arial; color: #000000 } input {FONT-SIZE: 10.5pt; FONT-FAMILY: Verdana, 宋体, MingLiU, Arial; color: #000000 } body {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000} select {FONT-SIZE: 10.5PT;font-family: Verdana,宋体} option {FONT-SIZE: 10.5pt;font-family: Verdana,宋体} textarea {FONT-SIZE: 10.5pt;font-family: Verdana,宋体} --> </STYLE> </head> <% if request("lm")<>"" or request("title")<>"" or request("content")<>"" then lm=trim(request("lm")) aaa=split(lm,"|") lm1=aaa(0) lm2=aaa(1) lm3=aaa(2) title=trim(request("title")) htitle=trim(request("htitle")) if htitle="" then htitle=" " title=replace(title,"""","") title=replace(title,"'","") content=request("content") tj=trim(request("tj")) html=trim(request.Form("html")) zz=trim(request("zz")) tuwen=trim(request("tuwen")) ztid=trim(Request("ztid")) yurl=trim(request("yurl")) if (not isNumeric(ztid)) then ztid=0 end if TouTiao=trim(request("TouTiao")) if (not isNumeric(TouTiao)) then TouTiao=0 end if url=trim(request("url")) GoogleMap=trim(Request("GoogleMap")) titlecolor=trim(request("titlecolor")) pic=trim(request("pic")) xgnews=trim(request("xgnews")) addtime=trim(Request("addtime")) hit=trim(Request("hit")) if addtime="" then addtime=now() if (not isDate(addtime)) then Response.Write "<Script Language=JavaScript>alert('日期/时间格式不正确 "&addtime&"');</Script> <meta http-equiv='refresh' content='0; url=javascript:window.history.go(-1);'>" response.end end if laiyuan=trim(request("laiyuan")) piczz=trim(request("piczz")) if (not isNumeric(hit)) then hit=1 end if ontop=trim(request("ontop")) if ontop<>"5" then ontop=3 ontop=int(ontop) if zz="" then zz=" " if piczz="" then piczz=" " if laiyuan="" then laiyuan=" " if url="" then url=" " if tj="" then tj="不推荐" if TouTiao="1" then conn.Execute "update [News] set [TouTiao]=0 " end if if pic="" then nr=content nr=replace(nr,"<IMG","<img") nr=replace(nr,"SRC=","src=") nr=replace(nr,"","") nr=replace(nr,"","") nr=replace(nr,"","") if instr(nr,"<img")<>0 and instr(nr,"src=")<>0 then nr=replace(nr,"""","") aa=Split(nr,"<img") bb=aa(1) cc=split(bb,">") dd=cc(0) ee=split(dd,"src=") ff=ee(1) gg=split(ff," ") if tuwen="1" then pic=gg(0) end if end if end if if pic="" then pic=" " if Request.Cookies("admindj")="3" then if config("lrySH")=0 then sh=2 else sh=1 end if else sh=1 end if addtime=formatdatetime(addtime,0) if request("id")="" then if html="1" then Response.Cookies ("html")="1" dddd=year(now())&"/"&month(now()) filename="html/"&dddd&"/" bbbhtml="html/"&dddd else filename="0" Response.Cookies ("html")="0" end if set rs = Server.CreateObject("ADODB.RecordSet") rs.Open "select top 1 * from [news] order by id desc",conn,1,3 rs.addnew rs("time")=addtime rs("adduser")=session("admin__user") rs("hit")=hit rs("lm")=lm1 rs("lm2")=lm2 rs("lm3")=lm3 rs("title")=title rs("htitle")=htitle rs("titlecolor")=titlecolor rs("content")=content rs("zz")=zz rs("laiyuan")=laiyuan rs("piczz")=piczz rs("ztid")=ztid rs("tj")=tj rs("pic")=pic rs("html")=html rs("url")=url rs("TouTiao")=TouTiao rs("YURL")=YURL rs("xgnews")=xgnews rs("ontop")=ontop rs("sh")=sh rs.update newsid=rs("id") an=newsid if filename<>"0" then filename=filename&rs("ID")&".htm" conn.Execute "update [News] set [filename]='"&filename&"' where id="&clng(newsid) rs.close:set rs=nothing conn.Execute "update [news] set [updat]="&newsid&" where id="&clng(newsid) if sh=2 then Response.Write "<script>alert('请等待管理审核,审核之前,你仍然可以编辑新闻。');</script>" end if else set rs = Server.CreateObject("ADODB.RecordSet") rs.Open "select top 1 * from [news] where id="&trim(Request("id"))&" order by id desc",conn,1,3 rs("lm")=lm1 rs("lm2")=lm2 rs("lm3")=lm3 rs("title")=title rs("htitle")=htitle rs("titlecolor")=titlecolor rs("content")=content rs("zz")=zz rs("laiyuan")=laiyuan rs("piczz")=piczz rs("ztid")=ztid rs("tj")=tj rs("pic")=pic rs("url")=url rs("TouTiao")=TouTiao rs("YURL")=YURL rs("xgnews")=xgnews rs("html")=html rs("ontop")=ontop rs("sh")=sh rs("time")=addtime rs("hit")=hit if html="1" then Response.Cookies ("html")="1" dddd=year(rs("time"))&"/"&month(rs("time")) Randomize an="" an=trim(request("id")) if an="" then an= int((999-111+1) * RND +111) aaahtml=an if rs("filename")<>"0" then filename=rs("filename") else filename="html/"&dddd&"/"&aaahtml&".htm" end if bbbhtml="html/"&dddd else filename="0" sdDel(rs("filename")) Response.Cookies ("html")="0" end if rs("filename")=filename rs.update newsid=rs("id") rs.close:set rs=nothing if sh=2 then Response.Write "<script>alert('请等待管理审核,审核之前,你仍然可以编辑新闻。');</script>" end if end if end if tgid=trim(request("tgid")) if tgid<>"" then conn.Execute "delete from [usertougao] where ID="&CInt(tgid) end if lmid=lm3 if lmid="0" or lmid="" then lmid=lm2 if lmid="0" or lmid="" then lmid=lm1 %> <p> <br><br><br><br><Center><a href=admin/admin_news_add.asp?lmid=<%=lmid%>&titlecolor=<%=titlecolor%>> 保存成功,正在返回中.....</a></Center> <META http-equiv="refresh" content="3;url=admin/admin_news_add.asp?lmid=<%=lmid%>&titlecolor=<%=titlecolor%>"> <% ccc=filename if filename<>"" and html="1" then Response.Write "<iframe name='SC' src='admin_htmlsc.asp?newsID="&NewsID&"' marginwidth='1' marginheight='1' height='1' width='1' scrolling='no' border='0' frameborder='0'></iframe>" end if %> <% conn.close set conn=nothing %>